The present invention relates to a variable circuit for changing a circuit configuration by changing connected states of a plurality of flipflops.
Conventionally, various counter circuits have been used upon designing a digital circuit for specified counting operations and the like. For example, a Johnson counter for counting by (2n)s by feeding an output of the final stage of a n-bit shift register to the first stage while inverting it is used. This Johnson counter differs from usual ring counters in that a loop returning from the final stage to the first stage is twisted, and (2n) count patterns are created in the case of using the n-bit shift register. Thus, the Johnson counter can be configured by half the number of flipflops as compared to the ring counters and has an advantage that counting can be speeded up since each flipflop has a time margin of n clocks upon changing its state from 0xe2x86x921xe2x86x920.
However, in the above conventional Johnson counter, a circuit configuration such as the number of stages of shift registers is determined beforehand so as to realize a desired counting operation and the like. Once the Johnson counter is manufactured, the circuit configuration cannot be changed by changing the connected states of the respective flipflops. Therefore, the configuration of the Johnson counter could not be suitably changed.
An object of the present invention is to provide a variable circuit enabling a desired Johnson counter to be easily configured by changing a circuit configuration after the circuit is manufactured.
The variable circuit according to an aspect of the present invention is a variable circuit for changing a circuit configuration by changing connected states of a plurality of flipflops, wherein the plurality of flipflops are arranged in a first and a second rows, and in the case that the flipflops in the first and second rows are alternately arranged, an input side of each flipflop arranged in the first row has a connection selected from a twisted connection with an output side thereof, a straight connection with an output side of the flipflop provided before this flipflop in the first row, and twisted connections with output sides of two flipflops arranged in the second row and adjacent to this flipflop, and an input side of each flipflop arranged in the second row has a connection selected from a twisted connection with an output side thereof, a straight connection with an output side of the flipflop provided before this flipflop in the second row, and straight connections with output sides of two flipflops arranged in the first row and adjacent to this flipflop.
In the variable circuit thus configured, ring counters of a desired number of stages can be configured by connecting one or a plurality of flipflops in loop, and a loop can be formed by the twisted connection only at one stage of each ring counter. Thus, a desired Johnson counter can be easily configured by changing the circuit configuration after the variable circuit is configured.
Preferably, Johnson counters constructed by the plurality of flipflops include a Johnson counter provided with a stop-motion control for stopping the state transition thereof.
In such a case, since the Johnson counter can execute a normal state transition and stop in a desired state by having the stop-motion control, various state transitions can be realized.
Preferably, the Johnson counter provided with the stop-motion control includes a first and a second Johnson counters, and a decoded output of the first Johnson counter is used as a stop-motion control signal for controlling the stop motion of the second Johnson counter.
In such a case, a certain state of the first Johnson counter can kick the second Johnson counter to transition the state of the second Johnson counter to a desired one, and a desired state transition can be realized by combining a plurality of Johnson counters.
These and other objects, features and advantages of the present invention will become more apparent upon reading the following detailed description along with the accompanying drawings.